﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace ActionRuntime
{
    public class StatusDetail
    {
        public bool has_reach_highest = false;
        public bool has_touch_ground = false;
        public bool has_touch_wall = false;
        public bool has_hit_target = false;
    }

    /// <summary>
    /// Action 核心
    /// </summary>
    public class ActionStatus
    {
        private Data.ActionGroup mActionGroup = null;
        private Data.Action mActiveAction = null;

        private string StartupAction = Data.CommonAction.IdleInFight;

        bool mInitialized = false;
        bool mRotateOnHit = false;
        bool mIgnoreGravity = false;
        bool mCanMove = false;
        bool mCanRotate = false;
        bool mCanHurt = false;
        bool mFaceTarget = false;
        bool mIsPentrate = false;
        bool mIsShow = false;

        int mActionTime = 0;
        int mActionKey = -1;

        float mTotalTime = 0.0f;
        float mGravity = 0.0f;

        float mActionScale = 1.0f;
        Vector3 mBounding = Vector3.zero;

        Data.HeightStatusFlag mHeightState = Data.HeightStatusFlag.None;

        int mActionGroupIndex = -1;
        int mUnitId = -1;
        EUnitType mUnitType;

        private HitProcesser mHitProcesser;
        private EventProcesser mEvtProcesser;
        private ActionProcesser mActionProcesser;
        private MoveProcesser mMoveProcesser;

        public Unit OwnerProxy { get; set; }
        public Unit TargetProxy { get; set; }
        public StatusDetail StatusInfo { get; set; }
        public Data.ActionGroup ActionGroup { get { return mActionGroup; } }
        public bool RotateOnHit { get { return mRotateOnHit; } }
        public bool IgnoreGravity { get { return mIgnoreGravity; } }
    }
}
